package define.Demo_02.GirlFriend;

public class GirlFriend {
    //姓名
    private String name;
    //年龄
    private int age;
    //性别
    private char sex;
    //爱好
    private String hobby;

    //构造方法
    public GirlFriend() {
    }


    public GirlFriend(String name, int age, char sex, String hobby) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.hobby = hobby;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }
    @Override
    public String toString(){
        return "姓名"+this.name+",年龄"+this.age;
    }
}
